package com.maezia.tdr.common.annotation;

import com.maezia.tdr.common.DateTimeValidator;
import com.maezia.tdr.common.enums.CheckDateEnum;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = DateTimeValidator.class)
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface DateTimeFormat {

    String message() default "";

    String pattern() default "";

    CheckDateEnum type() default CheckDateEnum.DEFAULT;

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
